<div class="x_panel">
  <div class="x_content row">
    <div class="col-xs-12">
      <form class="form-horizontal form-label-left" action="{$actionUrl}" method="post" enctype="multipart/form-data">
        <div class="form-group">
          <label class="control-label col-md-2 col-sm-4 col-xs-12">文章标题：</label>
          <div class="checkbox col-md-10 col-sm-8 col-xs-12">
            <input class="form-control col-md-3 col-xs-12" required="required" type="text" name="form[article_title]" value="{$article.article_title}">
          </div>
          {if $article.article_type==3}
          <label class="control-label col-md-2 col-sm-4 col-xs-12">所属板块：</label>
          <div class="checkbox col-md-10 col-sm-8 col-xs-12">
            <input class=""  type="radio" name="form[extend_type]" value="0" {if {$article.extend_type==0}}checked="checked"{/if}>留学项目
            <input class=""  type="radio" name="form[extend_type]" value="1" {if {$article.extend_type==1}}checked="checked"{/if}>游学项目
            <input class=""  type="radio" name="form[extend_type]" value="2" {if {$article.extend_type==2}}checked="checked"{/if}>板鸭宝典
          </div>
          {/if}

          <label class="control-label col-md-2 col-sm-4 col-xs-12">封面图片：</label>
          <div class="checkbox col-md-10 col-sm-8 com-xs-12">
            {if $article_pic}<img style="width:100px;height:100px;" src="{$article_pic}"/>{/if}
            <input type="file" name="article_pic">
          </div>

          <label class="control-label col-md-2 col-sm-4 col-xs-12">文章简介：</label>
          <div class="checkbox col-md-10 col-sm-8 col-xs-12">
            <input class="form-control col-md-3 col-xs-12" type="text" name="form[article_desc]" value="{$article.article_desc}">
          </div>

          <label class="control-label col-md-2 col-sm-4 col-xs-12">内容：</label>
          <div class="col-md-10 col-sm-9 col-xs-12">
              <textarea rows="20" id="J_detail" name="form[article_content]">
                {$article.article_content}
              </textarea>
          </div>

        </div>
        <div class="col-md-3 col-sm-12 col-xs-12 col-md-offset-4 col-sm-offset-4">
          <input type="hidden" name="article_id" value="{$article.article_id}">
          <button class="btn btn-primary" type="submit">更新</button>
        </div>
      </form>
    </div>
  </div>
</div>

<script src="{$theme}/js/source/ueditor/ueditor.config.js"></script>
<script src="{$theme}/js/source/ueditor/ueditor.all.js"></script>
<script src="{$theme}/js/source/ueditor/lang/zh-cn/zh-cn.js"></script>
<script src="{$theme}/js/source/layer/layer.js"></script>
<script src="{$theme}/libs/js/select/select2.full.js"></script>
<script>
    window.UEDITOR_CONFIG.initialFrameHeight = 320;

    UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
    UE.Editor.prototype.getActionUrl = function(action) {
        if (action == 'uploadimage' || action == 'uploadscrawl' || action == 'uploadimage') {
            return '/index/upload.html';
        } else if(action == 'uploadvideo')
        {
            return '/index/upload-video.html';
        }
        else
        {
            return this._bkGetActionUrl.call(this, action);
        }
    }
    var detailUe = UE.getEditor('J_detail');
</script>
